﻿using System;
using System.Collections.Generic;
using System.Web;

namespace Vincent.WebUI
{
    /// <summary>
    /// 响应来自于一般处理文件 HandlerGoods.ashx 的请求
    /// </summary>
    public class CHandlerGoods
    {
        /// <summary>
        /// 选择方法
        /// </summary>
        /// <param name="context"></param>
        public static void ChooseMethod()
        {           
            string act = _Request.GetString("act", "");

            switch (act)
            {
                
                // 增

                // 删

                // 改

                // 查
                case "good_list":
                    GoodList();
                    break;
                

            }
        }

        // 查询列表
        private static void GoodList()
        {
            int page = _Request.GetInt("page", 0);
            int pagesize = _Request.GetInt("pagesize", 0);

            string json = Vincent.GoodsBLL.p_Goods_list_json(page, pagesize, "");

            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.Write(json);
            HttpContext.Current.Response.End();
        }
    }
}
